home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / business / pcprojct.zip / PROJECT.ZOO / classes / projapp.cls < prev    next >
Text File  |  1990-05-09  |  3KB  |  75 lines

  1. /* The ProjApp defines the startup behavior of the project
  2.    application.  It inherits from the formal class Application.
  3.    This is a new class defined in Actor 2.0.
  4. */!!
  5.  
  6. inherit(Application, #ProjApp, nil, 2, nil)!!
  7.  
  8. now(class(ProjApp))!!
  9.  
  10. /* Remove unused methods during seal off. */
  11. Def removeExtra(self)
  12. {
  13.   removeMethods(self, Date, #(asLongString asVeryLongString asDayString
  14.         diff inc dec next previous dayOfWeek));
  15.   removeMethods(self, DateClass, #(current));
  16.   removeMethods(self, Network, #(show));
  17.   removeMethods(self, Node, #(show));
  18.  
  19.   removeMethods(self, Number, #(cos sqrt tan sin exp log arcCos 
  20.         arcSin degToRad radToDeg asHex));
  21.   removeMethods(self, Int, #(random, tabs));
  22.   removeMethods(self, Rect, #(inflate, offset, intersect,
  23.         union, setOrigin,origin,setCorner));
  24.   removeMethods(self, Object, #(removeCompiler));
  25.   removeMethods(self, String, #(asGlobalHandle,
  26.     charSet, compile, copyUpTo, fillWith, format,
  27.     left, literal, map, primFormat, replicate, right, 
  28.     trimLeading, trimTrailing, upTo,leadingBlanks,
  29.     breakLines,erase,rightJustify));    
  30. removeMethods(self, Point, #(round, line));
  31. removeMethods(self, Object, #(wCallArgsError,ancestError,
  32.        cstat,inheritError,inspect,dateStr,group,timeStr,
  33.        traceOff,break,removeNames,condCompile,getFileName,
  34.        inherit,ancestors,now));
  35. removeMethods(self, Struct, #(copyFromLong));
  36. removeMethods(self, Dictionary, #(reclaim));
  37. removeMethods(self, Symbol, #(implementors));
  38. removeMethods(self, Char, #(isHexDigit));
  39. removeMethods(self, Real, #(radToDeg,degToRad));
  40. removeMethods(self, MethodDictionary, #(profile,clear));
  41. removeMethods(self, Collection, #(writeLinesOn, browse));
  42. removeMethods(self, WindowsObject, #(getCRect,sendMessage,validate));
  43. removeMethods(self, Dialog, #(toggle,flash,disableItem,enableItem));
  44. removeMethods(self, Window, #(recreate,changeMenu));
  45.  
  46. removeMethods(self, System, #(profile));
  47. removeMethods(self, IdentityDictionary, #(profile));
  48. }!!
  49.  
  50. now(ProjApp)!!
  51.  
  52. /* Start the project application.  Show the window, 
  53.    load selected file (if any) and display about box.
  54. */
  55. Def init(self , commandStr | dlg, fName)
  56. { init(self:ancestor, commandStr);
  57.   register(ProjWindow);
  58.   register(GanttWindow);
  59.   mainWindow := new(ProjWindow, nil, nil, loadString(PW_APPNAME), nil);
  60.   show(mainWindow, CmdShow);
  61.   if commandStr
  62.     fName := words(commandStr)[0];
  63.     if fName 
  64.       fileOpen(mainWindow, fName);
  65.     endif;
  66.   endif;
  67.   dlg := new(Dialog);
  68.   runModal(dlg, ABOUT_BOX, mainWindow);
  69.   /* set the cursor in case there's no mouse */
  70.   setCursorPos(mainWindow, 
  71.          point(mainWindow.boxHSpace, mainWindow.boxHeight));
  72. }!!
  73.  
  74. /* Class Initialization */
  75.